export default {
  mounted () {
    setTimeout(() => {
      document.querySelectorAll('div[class*="language-"] pre').forEach((el) => {
        const tryButton = el.querySelector('.try-button');
        if (tryButton) {
          el.addEventListener('mouseover', () => {
            tryButton.style.opacity = '1';
          })
          el.addEventListener('mouseout', () => {
            tryButton.style.opacity = '0';
          })
        }
      })
    }, 100)
  }
}